﻿<UserControl x:Class="Shoozla.FolderListView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
            xmlns:s="clr-namespace:Shoozla"
            xmlns:sv="clr-namespace:Shoozla.View"
            xmlns:svm="clr-namespace:Shoozla.ViewModel"            
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="390" d:DesignWidth="677"
             x:Name="FolderViewControl"
             >
 
    
        <DockPanel>
        <Border BorderBrush="{DynamicResource HighlightBrush}" BorderThickness="0,1,0,0"  DockPanel.Dock="Bottom">
            <Grid Background="{DynamicResource AccentColorBrush}">
                <!-- AccentColor3 -->
                <DockPanel LastChildFill="True" VerticalAlignment="Center" Height="32">
                <WrapPanel DockPanel.Dock="Left" VerticalAlignment="Center" >
                    <!--<Button x:Name="SelectAllBT"  Command="{Binding Path=CmdSelectAll}" Width="35" ToolTip="Select All"  >
                        <Image Source="/Shoozla;component/Images/selectAll.png"/>
                    </Button>
                        <Button x:Name="SelectNoneBT" Command="{Binding Path=CmdSelectNone}" Width="35" ToolTip="Clear selection" >
                        <Image Source="/Shoozla;component/Images/selectNone.png"/>
                    </Button>-->
               
                        <TextBlock VerticalAlignment="Center" Foreground="black" Margin="5,0,5,0">Display filters:</TextBlock>
                        <Button x:Name="ShowAllBT"  Command="{Binding Path=CmdShowAll}" MinWidth="70"  ToolTip="Show all Mp3" Content="all">
                        <!--<Image Source="/Shoozla;component/Images/all.png"/>
                            Background="{DynamicResource AccentColorBrush}"
                            -->
                    </Button>
                     <Button x:Name="ShowUnCoveredBT" Command="{Binding Path=CmdShowUnCovered}" MinWidth="70" ToolTip="Show only MP3 without a cover" Content="empty" >                            
                     </Button>
                        <Button x:Name="ShowCoveredBT" Command="{Binding Path=CmdShowCovered}" MinWidth="70" ToolTip="Show only Mp3 with a cover" Content="artwork">
    
                    </Button>
                    <Separator></Separator>
                    <TextBox Name="filterTB" MinWidth="200" Height="20"  Text="search mp3..." TextChanged="filterTB_TextChanged" FontSize="12" FontStyle="Oblique" GotFocus="filterTB_GotFocus"></TextBox>
                </WrapPanel>
                <TextBlock></TextBlock>
            </DockPanel>
        </Grid>
        </Border>
        <!--ItemContainerStyle="{DynamicResource ListViewItemContainerStyle}"  -->
        <Grid>
            <ListView Foreground="Black"  Grid.Row="1" Name="folderLV" ItemsSource="{Binding DisplayedSongs}" SelectionChanged="folderLV_SelectionChanged" GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler">
            <ListView.Resources>
                <Style TargetType="{x:Type ListViewItem}"  xmlns:system="clr-namespace:System;assembly=mscorlib"  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
                    <EventSetter Event="MouseDoubleClick" Handler="HandleDoubleClick" />
                </Style>                
            </ListView.Resources>
            <ListView.View>
                    <GridView>
                        <GridViewColumn Width="25" CellTemplate="{DynamicResource checkboxCell}">
                            <CheckBox IsThreeState="False" IsChecked="{Binding Path=AllChildSelected}"/>
                        </GridViewColumn>
                        <GridViewColumn Header="Artist" Width="Auto" CellTemplate="{DynamicResource ArtistCell}"  />
                        <GridViewColumn Header="Title" Width="Auto" CellTemplate="{DynamicResource TitleCell}" />
                        <GridViewColumn Header="Album" Width="Auto" CellTemplate="{DynamicResource AlbumCell}" />
                        <GridViewColumn Header="Genre" Width="Auto" CellTemplate="{DynamicResource GenreCell}" />
                        <GridViewColumn Header="Cover" Width="Auto"  CellTemplate="{StaticResource hasCoverCell}"/>
                    </GridView>
                </ListView.View>
            </ListView>
            <TextBlock Margin="0,50,0,0" HorizontalAlignment="Center" FontSize="12" FontStyle="Italic"  Background="Transparent" Visibility="{Binding ShowHint, Converter={StaticResource boolToVis}}" Text="No mp3 files found" />
        </Grid>
    </DockPanel>

</UserControl>
